import 'package:flutter/material.dart';
import 'package:nyh_motorcade_app/styles/colors.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class DefaultLoadingWidget extends StatefulWidget {
  final Color backGroundColor;

  DefaultLoadingWidget({
    Key? key,
    this.backGroundColor = Colours.color_background,
  }) : super(key: key);

  @override
  State<StatefulWidget> createState() {
    return _DefaultLoadingWidgetState();
  }
}

class _DefaultLoadingWidgetState extends State<DefaultLoadingWidget> {
  @override
  Widget build(BuildContext context) {
    return Container(
      color: widget.backGroundColor,
      child: Center(
        child: Container(
          width: 25.w,
          height: 25.w,
          child: CircularProgressIndicator(
            strokeWidth: 1,
            valueColor: AlwaysStoppedAnimation<Color>(Colours.color_theme),
          ),
        ),
      ),
    );
  }
}
